<div style="padding-left: 20px;"><?php echo $this->element('menu');?>
<h1>Tìm kiếm bạn bè</h1>
 <table>
<?php 
echo $this->Form->create('User');
echo $this->Form->input('Profile.name');
echo $this->Form->end('Tìm');
if($friend)
foreach ($friend as $fr):{?>
 <tr>
 <?php echo $this->Html->image($fr['Profile']['avatar'],array('alt'=>'CakePHP','class'=>'img-circle','width'=>'50px','height'=>'50px'));
       echo $fr['Profile']['name'];
       echo $this->Html->link('Kết bạn',array('controller'=>'FriendUsers','action'=>'addfriend',$name['User']['id'],$fr['User']['id']));
       
       ?>
       <br />
 </tr>
  
  
  
  
<?php }endforeach;
else echo 'Không có ai';
?>
</table>
</div>  